package com.fowo.api.model.adjustment.order;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fowo.api.common.excel.ChildExcelProperty;
import com.fowo.api.common.model.ImportRow;
import com.fowo.api.common.validator.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/**
 * 调整单 预览导入辅助模型(全字段为文本类型)
 * @author yl_ls
 */
@Getter
@Setter
public class AdjustmentOrderImportPo {

  /** 调整单号 */
  @ExcelProperty("*调整单号")
  @NotBlank(message = "调整单号不能为空")
  private String orderSn;

  /** 仓库 */
  @ExcelProperty("*仓库")
  @NotBlank(message = "仓库不能为空")
  @Size(max = 50, message = "仓库长度不能超过50")
  private String widName;

  @ExcelIgnore
  @Schema(title = "*仓库")
  private String wid;

  /** 类型 */
  @ExcelProperty("*类型")
  @NotBlank(message = "类型不能为空")
  @EnumsString(
    value = { "数量调整", "换标调整", "SKU调整" },
    message = "类型只能是“数量调整”, “换标调整”, “SKU调整”中的一个"
  )
  private String type;

  /** 状态 */
  @ExcelProperty("*状态")
  @NotBlank(message = "状态不能为空")
  private String status;

  /** 备注 */
  @ExcelProperty("备注")
  @Size(max = 50, message = "备注长度不能超过50")
  private String remark;

  /** 调整单子表 */
  @ChildExcelProperty
  private List<ImportRow<AdjustmentOrderAndAdjustmentOrderProductImportPo>> productLists;
}
